﻿Public Class SozlesmeGiris

    Private Sub SozlesmeDetayBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SozlesmeDetayBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.SozlesmeDetayBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.SozlesmeGirisDataSet)

    End Sub





    Private Sub SozlesmeGiris_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'TODO: This line of code loads data into the 'SatıcıFirmaLookUpDataSet.Firmalar' table. You can move, or remove it, as needed.
        Me.FirmalarTableAdapter2.FillSatıcı(Me.SatıcıFirmaLookUpDataSet.Firmalar)
        'TODO: This line of code loads data into the 'KiracıLookUpDataSet.Firmalar' table. You can move, or remove it, as needed.
        Me.FirmalarTableAdapter1.Fill(Me.KiracıLookUpDataSet.Firmalar)
        'TODO: This line of code loads data into the 'KullanıcıLookUpDataSet.Kullanıcılar' table. You can move, or remove it, as needed.
        Me.KullanıcılarTableAdapter.Fill(Me.KullanıcıLookUpDataSet.Kullanıcılar)
        'TODO: This line of code loads data into the 'SozTurLookUpDataSet.SozlesmeTuru' table. You can move, or remove it, as needed.
        Me.SozlesmeTuruTableAdapter.Fill(Me.SozTurLookUpDataSet.SozlesmeTuru)
        'TODO: This line of code loads data into the 'FirmalarLookUpDataSet.Firmalar' table. You can move, or remove it, as needed.
        Me.FirmalarTableAdapter.Fill(Me.FirmalarLookUpDataSet.Firmalar)
        'TODO: This line of code loads data into the 'OdemeSekliLookUpDataSet.OdemeSekilleri' table. You can move, or remove it, as needed.
        Me.OdemeSekilleriTableAdapter.Fill(Me.OdemeSekliLookUpDataSet.OdemeSekilleri)
        'TODO: This line of code loads data into the 'TeslimSekliLookUpDataSet.TeslimSekilleri' table. You can move, or remove it, as needed.
        Me.TeslimSekilleriTableAdapter.Fill(Me.TeslimSekliLookUpDataSet.TeslimSekilleri)
        'TODO: This line of code loads data into the 'SozDurumLookUpDataSet.SozlesmeDurum' table. You can move, or remove it, as needed.
        Me.SozlesmeDurumTableAdapter.Fill(Me.SozDurumLookUpDataSet.SozlesmeDurum)
        'TODO: This line of code loads data into the 'DCLookUpDataSet.DovizCinsleri' table. You can move, or remove it, as needed.
        Me.DovizCinsleriTableAdapter.Fill(Me.DCLookUpDataSet.DovizCinsleri)
        'TODO: This line of code loads data into the 'PazLookupDataSet.Pazarlamacılar' table. You can move, or remove it, as needed.
        Me.PazarlamacılarTableAdapter.Fill(Me.PazLookupDataSet.Pazarlamacılar)
        'TODO: This line of code loads data into the 'SozlesmeGirisDataSet.SozlesmeDetay' table. You can move, or remove it, as needed.
        Me.SozlesmeDetayTableAdapter.Fill(Me.SozlesmeGirisDataSet.SozlesmeDetay)

    End Sub

    Private Sub ButtonTesvikBilgileri_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonTesvikBilgileri.Click
        TesvikBilgileri.Show()
    End Sub

    Private Sub ButtonYeniKiracıFirma_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonYeniKiracıFirma.Click
        FirmaGiriş.Show()
        FirmaGiriş.FirmalarBindingSource.AddNew()

        FirmaGiriş.ComboBoxFirmaTuru.Text = "KIRACI"

    End Sub

    Private Sub ButtonYeniSatıcıGiriş_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonYeniSatıcıGiriş.Click
        FirmaGiriş.Show()
        FirmaGiriş.FirmalarBindingSource.AddNew()

        FirmaGiriş.ComboBoxFirmaTuru.Text = "SATICI"
    End Sub

    Private Sub ButtonMuhasebeBilgileriGir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonMuhasebeBilgileriGir.Click
        MuhasebeBilgileri.Show()


    End Sub

    Private Sub ButtonArsivBilgileriGir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonArsivBilgileriGir.Click
        SozlesmeArsivGiris.Show()


    End Sub

    Private Sub ButtonMumessilFirma_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonMumessilFirma.Click
        MümessilFirma.Show()
        'burada yapılmaya çalışılan Sozlesmegiriş formunda yazılı olan satıcı firmanın kodu 
        'ile mümessil firmanın açılmasını sağlamak 
        'Dim FirmaIDToolStripTextBox As TextBox = Me.ComboBoxSatıcıFirma.Text
        'MümessilFirma.MumessilFirmalarTableAdapter.FillBy(MümessilFirma.MumessilFirmaDataSet.MumessilFirmalar, New System.Nullable(Of Integer)(CType(FirmaIDToolStripTextBox.Text, Integer)))




    End Sub

    Private Sub ButtonOdemeSekliDetay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonOdemeSekliDetay.Click

        If Me.ComboBoxOdemeSekli.Text = "PESİN" Then
            PesinOdemeDetay.Show()
        ElseIf Me.ComboBoxOdemeSekli.Text = "VESAIKMUK" Then
            VesaikMukabiliOdeDetay.Show()
        ElseIf Me.ComboBoxOdemeSekli.Text = "AKREDITIF" Then
            AkreditifÖdemeDetay.Show()
        End If


    End Sub

    Private Sub SozNoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)




    End Sub


    Private Sub SozNoMaskedTextBox_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles SozNoMaskedTextBox.MouseDown

        If e.Button = Windows.Forms.MouseButtons.Right Then
            Dim x As String = InputBox("Sozlesme Numarasını Giriniz")
            Me.SozlesmeDetayTableAdapter.FillBySozno(Me.SozlesmeGirisDataSet.SozlesmeDetay, sozno:=x)
        End If
    End Sub

    Private Sub ComboBoxKiracıFirma_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ComboBoxKiracıFirma.MouseDown
        If e.Button = Windows.Forms.MouseButtons.Right Then
            KiracıBul.Show()

        End If

    End Sub

    Private Sub SozlesmeGiris_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
        If e.Button = Windows.Forms.MouseButtons.Right Then
            ContextMenuStrip1.Show()
        End If
    End Sub


    Private Sub ToolStripMenuItemSozlesmeNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItemSozlesmeNo.Click

        Dim x As String = InputBox("Sozlesme Numarasını Giriniz")
        Me.SozlesmeDetayTableAdapter.FillBySozno(Me.SozlesmeGirisDataSet.SozlesmeDetay, sozno:=x)

    End Sub

    Private Sub ContextMenuStrip1_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip1.Opening

    End Sub

    Private Sub ToolStripMenukiracıadınagöre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenukiracıadınagöre.Click
        KiracıBul.Show()
    End Sub

    Private Sub ToolStripMenuSatıcıAdınagöre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuSatıcıAdınagöre.Click
        SatıcıBul.Show()

    End Sub

    Private Sub ButtonGuncelTakip_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGuncelTakip.Click
        GunelSozlesmeler.Show()

    End Sub
End Class